<!DOCTYPE html>
<html>
<head>
    <title>课次表</title>
		<#include "/header.html">
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <div class="grid-btn">
			<#if shiro.hasPermission("sys:classtime:save")>
            <a class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
			</#if>
			<#if shiro.hasPermission("sys:classtime:update")>
            <a class="btn btn-primary" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
			</#if>
			<#if shiro.hasPermission("sys:classtime:delete")>
            <a class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
			</#if>
        </div>
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
        <!--弹框 -->
        <div class="modal fade" id="imgModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
            <div class="modal-dialog" role="document">
                <form class="form-horizontal">
                    <div class="modal-content" id="bigImg" style="width:220px;height: 220px">
                    </div>
                </form>
            </div>
        </div>

    </div>

    <div v-show="!showList" class="panel panel-default">
        <div class="panel-heading">{{title}}</div>
        <form class="form-horizontal">
														                    <div class="form-group">
                        <div class="col-sm-2 control-label">课次名称</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="classtime.name" placeholder="课次名称"/>
                        </div>
                    </div>
											                    <!--<div class="form-group">-->
                        <!--<div class="col-sm-2 control-label">题目id,多个用逗号隔开</div>-->
                        <!--<div class="col-sm-10">-->
                            <!--<input type="text" class="form-control" v-model="classtime.questionids" placeholder="题目id,多个用逗号隔开"/>-->
                        <!--</div>-->
                    <!--</div>-->

                    <div class="form-group">
                        <div class="col-sm-2 control-label">题目图片</div>
                        <div >

                        </div>
                        <div style="vertical-align: middle;display: table-cell!important;">
                            <div id="questionids" style="float: left" class="col-sm-10">
                                <input type="text" class="form-control" disabled="disable" v-model="classtime.questionids"/>
                            </div>
                            <div class="col-sm-2">
                                <a class="btn btn-primary"  @click="addQuestionids">&nbsp;选择</a>
                            </div>
                        </div>
                    </div>

											                    <div class="form-group">
                        <div class="col-sm-2 control-label">添加时间</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" id="createtime" v-model="classtime.createtime" placeholder="添加时间"/>
                        </div>
                    </div>
							            <div class="form-group">
                <div class="col-sm-2 control-label"></div>
                <input type="button" class="btn btn-primary" id="btnSaveOrUpdate" data-loading-text="保存中..." @click="saveOrUpdate" value="确定"/>
                &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>

                <!--弹框 -->
                <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
                    <div class="modal-dialog" role="document">
                        <form class="form-horizontal">
                            <div class="modal-content" style="width:600px;">
                                <div style="padding: 15px;">
                                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                                    <div style="padding: 20px 0;border-bottom: 1px solid #E2E5ED;">
                                        <p style="font-size: 14px;color: #4c4948;float: left;margin: 0!important;">选择题目</p>
                                    </div>
                                </div>
                                <div class="modal-body"style="width:600px;">
                                    <div style="margin-bottom: 15px">
                                        <a class="btn btn-primary" @click="addQuestions" style="margin-left: 2%;margin-top: 10px">保存</a>
                                    </div>
                                    <table id="jqGridAdd" style="width: 600px"></table>
                                    <div id="jqGridPager1"></div>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>

            </div>
        </form>
    </div>
</div>

<script src="${request.contextPath}/statics/js/modules/sys/classtime.js?_${.now?long}"></script>
<script>
    var start= laydate.render({
        elem: '#createtime'//指定元素
        ,type: 'datetime'
    });
</script>
</body>
</html>